package View;

import java.awt.Color;
import java.awt.Font;

import javax.swing.JLabel;
import javax.swing.JPanel;

import Model.PieChart;
import Model.TransactionLineChart;


@SuppressWarnings("serial")
public class PanelDashboard extends JPanel {
	
	private static PanelDashboard single;
	
	private JLabel title = new JLabel("Dashboard");
	
	private Color backcolor = new Color(239, 238, 237);
	private Color titleColor = new Color(85, 85, 85);
	
	private PanelDashboard() {
		
		setLayout(null);
		setBounds(140, 0, 860, 725);
		setBackground(backcolor);
	
		PieChart p = new PieChart(null);
		p.setBounds(100, 60, 600, 300);
		add(p);
		
		
		TransactionLineChart lc = new TransactionLineChart(null);
		lc.setBounds(100, 360, 600, 300);
		add(lc);
		
		title.setBounds(330, 30, 200, 30);
	    title.setForeground(titleColor);
	    title.setFont(new Font("Serif", Font.BOLD, 20));
	    
	    add(title);
	}
	

	public static PanelDashboard getInstance() {
		if(single == null){
			single = new PanelDashboard();
		}
		return single;
	}
	
}